import socket
import struct
import time
sk=socket.socket()
sk.connect(('127.0.0.1',9001))
time.sleep(0.1)
lenth=sk.recv(4)
lenth=struct.unpack('i',lenth)[0]#返回的是一个元祖
msg1=sk.recv(lenth)
msg2=sk.recv(1024)
print(msg1.decode('utf-8'))
print(msg2.decode('utf-8'))


sk.close()
















